package com.jiwei.community.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiwei.community.dao.CategoryMapper;
import com.jiwei.community.entity.Category;
import com.jiwei.community.service.CategoryService;
import com.jiwei.community.vo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Category)表服务实现类
 *
 * @author jiwei
 * @since 2024-03-21 11:47:28
 */
@Service("categoryService")
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {
    @Resource(type = CategoryMapper.class)
    CategoryMapper categoryMapper;
    @Override
    public ResponseResult getCategoryList() {
        List<Category> categories = categoryMapper.selectList(null);
        return ResponseResult.okResult(categories);
    }
}

